package io.github.wanggit.antrpc.console.service;

import io.github.wanggit.antrpc.commons.bean.RegisterBeanMethod;
import io.github.wanggit.antrpc.console.domain.ConsumerRateLimiting;

import java.util.Map;

public interface ConsumerRateLimitingService {
    /**
     * 保存某个消费节点下某接口的某方法限流信息
     *
     * @param consumerRateLimiting ratelimiting
     */
    void saveOrUpdate(ConsumerRateLimiting consumerRateLimiting);

    /**
     * 查询某一个消费者节点下某个接口的限流信息
     *
     * @param consumerRateLimiting ratelimiting: appNameHostPort, className 必填
     * @return map
     */
    Map<String, RegisterBeanMethod> findConsumerRateLimitingByClass(
            ConsumerRateLimiting consumerRateLimiting);
}
